#ifndef     __CONFIG_H
#define     __CONFIG_H

#include "../utils/store.h"

namespace service {

struct Config {

    uint16_t flow1000_count; // 1000ml 需要多少脉冲
    uint16_t pump_ml_ms; // 1ml需要多少ms
    uint32_t draw_timeout; // 抽水超时时间  ms
    uint32_t heat_timeout; // 加热超时时间 ms
    uint16_t door_lock_adc;

    uint16_t steam_temp;
    uint16_t steam_kpa;

    void reset() {
        flow1000_count = 5487;
        draw_timeout = 30 * 60 * 1000;
        heat_timeout = 30 * 60 * 1000;
        steam_kpa = 375;
        steam_temp = 145;
        pump_ml_ms = 200;
        door_lock_adc = 10;
    }
};

inline utils::Store<Config, driver::flash::DATA_ADDR> config;

}

#endif
